package Sokoban;

import java.io.File;
import java.io.IOException;

public class MapObject {
	
	private ResourceManager manager;
	private TileMap map;
	private String mapFileName;
	
	MapObject (String mapFileName) throws IOException 
	{
		
		if (! new File(mapFileName).exists()) {
			throw new IllegalArgumentException("Plik " + mapFileName + " nie istnieje.");
		}
		
		this.mapFileName = mapFileName;
		manager = new ResourceManager();
		map = manager.loadMap(mapFileName);
		
	}
	
	public TileMap getMap()
	{
		return map;
	}
	
	public String getMapFileName()
	{
		return mapFileName;
	}
}

